/**
 * 时间插件样式
 * Created by wang on 2017/6/16.
 */
$('#date_range').daterangepicker(
    {
        locale: {
            format: "YYYY-MM-DD",
            "customRangeLabel": "自定义",
            "applyLabel": "确定",
            "cancelLabel": "取消",
            "daysOfWeek": [
                "日",
                "一",
                "二",
                "三",
                "四",
                "五",
                "六"
            ],
            monthNames: [
                "一月",
                "二月",
                "三月",
                "四月",
                "五月",
                "六月",
                "七月",
                "八月",
                "九月",
                "十月",
                "十一月",
                "十二月"
            ],
        },
        ranges: {
            "今天": [moment(), moment()],
            "昨天": [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
            "前7天": [moment().subtract(6, 'days'), moment()],
            "前30天": [moment().subtract(29, 'days'), moment()],
            "本月": [moment().startOf('month'), moment().endOf('month')],
            "上月": [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        }
    }
);